#!/usr/bin/ruby

require 'test/unit'
require 'lib/trafmonitor'

include LibTrafmonitor

config = Config.new( '/root/.trafmonitorrc' )
$LOG   = Logger.new( config.logfile )

class TestConfig < Test::Unit::TestCase
    def test_Config_initialization
        config = Config.new( '/root/.trafmonitorrc' )
        assert_instance_of( Config, config, 'Object "config" is not an instance of config' )
    end

    def test_Config_logfile
        config = Config.new( '/root/.trafmonitorrc' )
        assert_instance_of( String, config.logfile, 'Config#logfile doesn\'t return String' )
    end

    def test_Config_filter
        config = Config.new( '/root/.trafmonitorrc' )
        assert_instance_of( String, config.filter, 'Config#filter doesn\'t return String' )
    end
end
